home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / lib / povray / scenes / level3 / pool.pov < prev    next >
Text File  |  1994-03-08  |  8KB  |  343 lines

  1. // Persistence Of Vision raytracer version 2.0 sample file.
  2.  
  3. // By Dan Farmer
  4. /* Script for a lawn with a swimming pool.
  5.   Written by Dan Farmer.  Takes quite a while to render because of
  6.   the many textures and waveforms used.  An interesting variation of this
  7.   theme would be to change the view to look into the garden globe and see
  8.   the rest of the scene as the reflection in the globe.
  9.  
  10.   As stated below, most of the garden globe structure was taken from the
  11.   file "roman.pov".
  12. */
  13.  
  14. #include "colors.inc"
  15. #include "shapes.inc"
  16. #include "textures.inc"
  17.  
  18. /*
  19. #declare Cube = intersection {
  20.    plane { <0.0 0.0 1.0> 1.0 }
  21.    plane { <0.0 0.0 -1.0> 1.0 }
  22.    plane { <0.0 1.0 0.0> 1.0 }
  23.    plane { <0.0 -1.0 0.0> 1.0 }
  24.    plane { <1.0 0.0 0.0> 1.0 }
  25.    plane { <-1.0 0.0 0.0> 1.0 }
  26.    scale <1.0 1.0 1.0>
  27. }
  28. */
  29.  
  30. /* Most of the garden globe is borrowed from "roman.dat"*/
  31. /********************************************************/
  32. #declare Beam = object {
  33.    Cylinder_Y
  34.    scale <0.5, 20.0, 0.5>
  35.    translate 2.0*x
  36. }
  37.  
  38. /* create a sample column for the base of the structure */
  39. #declare BaseColumn = intersection {
  40.    union {
  41.       object { Beam }
  42.       object { Beam rotate  -25.7*y }
  43.       object { Beam rotate  -51.4*y }
  44.       object { Beam rotate  -77.1*y }
  45.       object { Beam rotate  -102.8*y }
  46.       object { Beam rotate  -128.5*y }
  47.       object { Beam rotate  -154.2*y }
  48.       object { Beam rotate  -179.9*y }
  49.       object { Beam rotate  -205.6*y }
  50.       object { Beam rotate  -231.3*y }
  51.       object { Beam rotate  -257.0*y }
  52.       object { Beam rotate  -282.7*y }
  53.       object { Beam rotate  -308.4*y }
  54.       object { Beam rotate  -334.1*y }
  55.    }
  56.    plane { y, 20.0 }
  57.    plane { -y, 0.0 }
  58.  
  59.    bounded_by {
  60.       intersection {
  61.          plane { y, 20.0 }
  62.          plane { -y, 0.0 }
  63.          object {
  64.             Cylinder_Y
  65.             scale <2.51, 1.0, 2.51>
  66.          }
  67.       }
  68.    }
  69.  
  70.    texture {
  71.       pigment {
  72.          White_Marble
  73.          scale 10.0
  74.          quick_color White
  75.       }
  76.       finish {
  77.          ambient 0.4
  78.          diffuse 0.9
  79.          reflection 0.1
  80.       }
  81.    }
  82. }
  83.  
  84. /* and a rectangular pad to serve as a footing for the column */
  85. #declare BasePad = object {
  86.    Cube
  87.    scale <4.0, 1.0, 4.0>
  88.  
  89.    bounded_by {
  90.       sphere {
  91.          <0, 0, 0>, 1
  92.          scale <10.0, 3.0, 10.0>
  93.       }
  94.    }
  95.  
  96.    texture {
  97.       pigment {
  98.          White_Marble
  99.          scale 10.0
  100.          quick_color red 0.6 green 0.6 blue 0.4
  101.       }
  102.       finish {
  103.          ambient 0.4
  104.          diffuse 0.9
  105.          reflection 0.1
  106.       }
  107.    }
  108. }
  109.  
  110. #declare Globe = sphere {
  111.    <0.0, 0.0, 0.0>, 5.0
  112.    texture {
  113.       finish { Mirror }
  114.       pigment { Blue }
  115.    }
  116. }
  117.  
  118. #declare Garden_Globe = union {
  119.    object { BaseColumn translate <0.0, 0.0, 0.0> }
  120.    object { BasePad    translate <0.0, -1.0, 0.0> }
  121.    object { BasePad    translate <0.0, 21.0, 0.0> }
  122.    object { Globe      translate<0.0, 26.0, 0.0> }
  123. }
  124. /********************* End of Garden Globe Epic *******************************/
  125.  
  126. /* Everybody's gotta have a point of view. */
  127. camera {
  128.    location <0.0, 30.0, -120.0>
  129.    direction <0.0, 0.0, 1.0>
  130.    up  <0.0, 1.0, 0.0>
  131.    right <4/3, 0.0, 0.0>
  132.    look_at <0.0, 0.0, 0.0>
  133. }
  134.  
  135. /* No, fool... i said _bud_ light! */
  136. light_source { <100.0, 200.0, -200.0> colour White }
  137.  
  138. /* "The sky was the color of her eyes" */
  139. /*             ... and just as cloudy! */
  140. sphere {
  141.    <0.0, -10000.0, -200.0>, 15000.0
  142.  
  143.    texture {
  144.       pigment {
  145.          Bright_Blue_Sky
  146.          scale <7500.0, 1000.0, 5000.0>
  147.          quick_color red 0.5 green 0.5 blue 1.0
  148.       }
  149.       finish {
  150.          crand 0.05
  151.          ambient 0.7
  152.          diffuse 0.0
  153.       }
  154.    }
  155. }
  156.  
  157. /* Plant a little grass, well mowed. */
  158. plane {
  159.    y, 0.0
  160.  
  161.    texture {
  162.       pigment { Green }
  163.       finish { crand 0.05 }
  164.       normal {
  165.          ripples 0.5
  166.          frequency 2000.0
  167.          scale 50000.0
  168.       }
  169.    }
  170. }
  171.  
  172. /* Now, we pour the concrete and set the tiles...*/
  173. difference {
  174.    object {
  175.       Cube
  176.       scale <45.0, 10.0, 60.0>
  177.    }
  178.    object {
  179.       Cube /* Inside box */
  180.       scale <35.0, 11.0, 50.0>
  181.    }
  182.  
  183.    translate <0.0, -8.0, 0.0>
  184.  
  185.    texture {
  186.       pigment {
  187.          checker colour DarkTurquoise colour White
  188.          scale 2.0
  189.          quick_color DarkTurquoise
  190.       }
  191.    }
  192. }
  193.  
  194. /* Better put some water in the pool! */
  195. object {
  196.    Cube
  197.    scale <35.0, 10.0, 50.0>
  198.    translate <0.0, -9.0, 0.0>
  199.  
  200.    texture {
  201.       pigment { LightBlue }
  202.       normal {
  203.          ripples 0.5
  204.          frequency 100.0
  205.          scale <5.0, 5.0, 10.0>
  206.          translate <20.0, 4.0, -15.0>    /* Where the ball floats?? */
  207.       }
  208.       finish {
  209.          crand 0.05
  210.          reflection 0.5
  211.          brilliance 3.0
  212.          /*  refraction 1.0        { Doesn't really help the scene any... }
  213.          ior 1.2 ?? */
  214.       }
  215.    }
  216. }
  217.  
  218. /* Let's add a diving board */
  219. union {
  220.    object {
  221.       Cube                        /* The board itself */
  222.       scale <6.0, 1.0, 30.0 >
  223.       translate <0.0, 2.0, -30.0>
  224.    }
  225.    object {
  226.       Cube                        /* a block under the board */
  227.       scale <6.0, 2.0, 2.0 >
  228.       translate <0.0, 1.0, -30.0>
  229.    }
  230.  
  231.    texture {
  232.       pigment {
  233.          Cherry_Wood
  234.          scale 0.02
  235.          quick_color Brown
  236.       }
  237.       finish { crand 0.05 }
  238.    }
  239. }
  240.  
  241. /* Float a red and white striped ball in the pool */
  242. sphere {
  243.    <0.0, 0.0, 0.0>, 5.0
  244.  
  245.    translate <20.0, 4.0, -15.0>    /* Sorta right front center of pool */
  246.  
  247.    texture {
  248.       pigment {
  249.          gradient < 1.0, 1.0, 0.0 >
  250.          colour_map {
  251.             [0.00 0.25  colour White colour White ]
  252.             [0.25 0.75  colour red 1.0  colour red 1.0]
  253.             [0.75 1.001 colour White colour White ]
  254.          }
  255.          scale <7.0 7.0 7.0>
  256.          rotate <-30.0 30.0 0.0>
  257.          quick_color Red
  258.       }
  259.       finish {
  260.          ambient 0.3
  261.          diffuse 0.7
  262.          phong 0.5
  263.          phong_size 10.0
  264.       }
  265.    }
  266. }
  267.  
  268. /* Place the garden globe on left side of pool */
  269. object { Garden_Globe translate <-60.0, 0.0, 0.0> }
  270.  
  271. /* The hedge behind the pool */
  272. object {
  273.    Cube
  274.  
  275.    scale <200.0, 30.0, 30.0>
  276.    translate <-100.0, 0.0, 180.0>
  277.  
  278.    texture {
  279.       pigment {
  280.          spotted
  281.          turbulence 0.5
  282.          colour_map {
  283.             [0.00 0.25  colour YellowGreen colour Green ]
  284.             [0.25 0.75  colour Green colour DarkGreen]
  285.             [0.75 1.001 colour DarkGreen colour YellowGreen ]
  286.          }
  287.          quick_color YellowGreen
  288.       }
  289.       normal { wrinkles 1.0 }
  290.       finish { crand 0.05 }
  291.       scale <10.0, 10.0, 20.0>
  292.    }
  293. }
  294.  
  295. /* The hedge on the right side of pool */
  296. object {
  297.    Cube
  298.  
  299.    scale <30.0, 30.0, 100.0>
  300.    translate <100.0, 0.0, -85.0>
  301.  
  302.    texture {
  303.       pigment {
  304.          spotted
  305.          turbulence 0.5
  306.          colour_map {
  307.             [0.00 0.25  colour YellowGreen colour Green ]
  308.             [0.25 0.75  colour Green colour DarkGreen]
  309.             [0.75 1.001 colour DarkGreen colour YellowGreen ]
  310.          }
  311.          quick_color YellowGreen
  312.       }
  313.       normal { wrinkles 1.0 }
  314.       finish { crand 0.05 }
  315.       scale <10.0, 10.0, 20.0>
  316.    }
  317. }
  318.  
  319. /* a low, squat shrub of some generic species */
  320. sphere {
  321.    <0, 0, 0>, 1
  322.  
  323.    scale <30.0, 20.0, 25.0>
  324.    translate <-70.0, 0.0, 110.0>
  325.  
  326.    texture {
  327.       pigment {
  328.          spotted
  329.          turbulence 0.5
  330.          colour_map {
  331.             [0.00 0.25  colour Khaki colour Green ]
  332.             [0.25 0.50  colour Green colour DarkGreen]
  333.             [0.50 0.75  colour DarkGreen colour MediumForestGreen]
  334.             [0.75 1.001 colour MediumForestGreen colour YellowGreen ]
  335.          }
  336.          quick_color YellowGreen
  337.       }
  338.       normal { wrinkles 1.0 }
  339.       finish { crand 0.05 }
  340.       scale 5.0
  341.    }
  342. }
  343.